home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 July
/
CMCD0704.ISO
/
Software
/
Shareware
/
Comunicatii
/
feedaemon
/
fd110rc5.exe
/
{app}
/
Data
/
defaults
/
styles
/
Forum.fdxsl
< prev
next >
Wrap
Extensible Markup Language
|
2004-05-28
|
4KB
|
126 lines
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
<xsl:output method="html"/>
<xsl:variable name="common-styles">
<style type="text/css">
body {
font-size: x-small;
font-family: Tahoma, Arial, sans-serif;
margin: 0;
margin-bottom: 12px;
color: WindowText;
background-color: Window;
}
div.channeltitle {
font-size: larger;
font-weight: bold;
margin: 10px 0;
text-align: center;
}
div.heading {
background-color: ThreedFace;
color: ButtonText;
border-top: 1px solid ThreedShadow;
border-bottom: 1px solid ThreedShadow;
padding: 8px 10px;
width: 100%;
}
div.newsitemicons { float: right; top: 0; }
div.newsitemcontent { font-family: "Courier New", monospace; margin: 10px 16px; }
div.newsitemcontent code { font-size: 100%; background-color: ThreedLightShadow; }
a { color: #004FC1; }
a:hover { color: red; }
span.nodescription { color: GrayText; }
</style>
</xsl:variable>
<!-- channel group -->
<xsl:template match="newspaper[@type='group']">
<html>
<head>
<title>Group Newspaper</title>
<xsl:copy-of select="$common-styles"/>
<style type="text/css">
body { background-color: ThreedLightShadow;}
div.channelnewsitems {
margin: 0 6px;
border: 1px solid ThreedShadow;
border-top: none;
background-color: Window;
}
</style>
</head>
<body>
<xsl:for-each select="channel">
<div class="channeltitle">
<xsl:value-of select="title"/>
</div>
<div class="channelnewsitems">
<xsl:for-each select="item">
<xsl:sort select="fd:sortKey" data-type="number" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
<!-- news item and channel -->
<xsl:template match="newspaper[@type='newsitem' or @type='channel']">
<html>
<head>
<title>Newspaper</title>
<xsl:copy-of select="$common-styles"/>
<xsl:if test="@type='newsitem'">
<style type="text/css">
div.heading { border-top: none;}
</style>
</xsl:if>
</head>
<body>
<xsl:for-each select="channel/item">
<xsl:sort select="fd:sortKey" data-type="number" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</body>
</html>
</xsl:template>
<!-- news item template -->
<xsl:template match="item">
<div class="heading">
<div class="newsitemicons">
<!-- add link to comments and enclosure if available -->
<xsl:if test="comments">
<xsl:variable name="commentlink" select="comments"/>
<xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
<a href="{$commentlink}"><img src="{$commentimg}" border="0" /></a>
</xsl:if>
<xsl:if test="enclosure">
<xsl:variable name="enclosurelink" select="enclosure/@url"/>
<xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
<a href="{$enclosurelink}"><img src="{$enclosureimg}" border="0" /></a>
</xsl:if>
</div>
<xsl:if test="author">
<strong>From: </strong><xsl:value-of select="author"/>
</xsl:if>
<xsl:variable name="srclink" select="source/@htmlUrl"/>
<strong>To: </strong><a href="{$srclink}"><xsl:value-of select="source"/></a>
<br />
<xsl:variable name="itemlink" select="link"/>
<strong>Subject: </strong><a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="no"/></a>
<br />
<strong><xsl:value-of select="fd:dateDisplay"/></strong>
</div>
<div class="newsitemcontent">
<xsl:value-of select="description" disable-output-escaping="yes"/>
</div>
</xsl:template>
</xsl:stylesheet>